package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

/**
 * @author iKun
 * @since 2024-06-17
 */
@Getter
@Setter
@TableName("sys_permission")
public class SysPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父id
     */
    private Integer parent;

    /**
     * 权限名称
     */
    private String name;

    /**
     * 类型（M目录 C菜单 F按钮）
     */
    private String type;

    /**
     * 路由组件
     */
    private String component;

    /**
     * 路由路径
     */
    private String path;

    /**
     * 后端接口的权限标识
     */
    private String permission;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<SysPermission> children;
}